import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

///统一卡片布局
class UiCard {
  static Widget build(BuildContext context, Widget ui) {
    return Card(
        color: Colors.white,
        surfaceTintColor: Colors.transparent,
        child: Padding(
          child: ui,
          padding: EdgeInsets.all(16),
        ),
        margin: EdgeInsets.only(left: 8, right: 8, top: 8, bottom: 0),
        shadowColor: Colors.black54,
        //阴影颜色
        elevation: 6,
        clipBehavior: Clip.antiAlias,
        shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(20))));
  }

  static Widget build2(BuildContext context, Widget ui) {
    return Card(
        color: Colors.white,
        surfaceTintColor: Colors.transparent,
        child: Padding(
          child: ui,
          padding: EdgeInsets.all(8),
        ),
        margin: EdgeInsets.only(left: 8, right: 8, top: 8, bottom: 0),
        shadowColor: Colors.black54,
        //阴影颜色
        elevation: 6,
        clipBehavior: Clip.antiAlias,
        shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(20))));
  }

}
